import { defineConfig, loadEnv } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import WindiCSS from 'vite-plugin-windicss';
import MiniProgramTailwind from '@dcasia/mini-program-tailwind-webpack-plugin/rollup';


// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
  loadEnv(mode, './env');

  return {
    plugins: [
      uni(),
      WindiCSS(),
      MiniProgramTailwind(),
      AutoImport({
        imports: [
          'vue',
          'pinia',
        ]
      }),
      Components({
        resolvers: [
          // NaiveUiResolver()
        ]
      })
    ],
  }
});
